using System;
using System.Collections.Generic;
using System.Text;

namespace MspEmulator
{
    class updateCP : ISend, IUpdateDevice
    {
        private ushort CP;

        public updateCP(ushort value)
        {
            CP = value;
        }
  
        #region ISend Members

        public void  Send()
        {
            Serial.Send(Utility.buildPack(Utility.collectData((byte)Utility.functCode.CP)));
        }

        #endregion

        #region IUpdateDevice Members

        public void  updateDevice()
        {
 	        Device.CP = CP;
        }

        #endregion
}
}
